#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFileDialog>
#include <QLabel>
#include <boost/typeof/typeof.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <opencv/cv.h>
#include <QStatusBar>
#include <QDebug>
#include <QScrollArea>
#include <string>
#include <boost/tuple/tuple.hpp>
#include "ann.h"
#include <QMessageBox>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void cV2QImage(cv::Mat &image,QScrollArea *scrollArea,QLabel *label);
    std::vector<int> sortedFileNames(QStringList &fiList);
    void viewMat(cv::Mat &mt);
    void dctOnImage(cv::Mat &mt);
    void drawRectOnGrayMat(cv::Mat &mt,int width, int height);
    std::vector<cv::Rect> autoExtractROI(cv::Mat &img);
    int getBlockType(cv::Mat &sampleBlock);
private slots:
    void on_action_triggered();
    void on_action_ROI_triggered();
    void on_action_BOG_triggered();
    void on_action_BPTrain_triggered();
    void on_action_BPTest_triggered();
    void on_action_3_triggered();
    void on_actionMean_shift_triggered();
    void on_action_5_triggered();
private:
    Ui::MainWindow *ui;
    QLabel *operationStatus;
    QStatusBar *statusBar;
    QStringList filesList;
    std::vector<cv::Rect> rois;
    cv::Mat singleMat;
    ANN bp;
};

#endif // MAINWINDOW_H
